<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
    <title>My JSP 'test.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="/baoxiao/css/jquery-1.4.2.min.js"></script>
<script type="text/javascript"> 
$(function(){
	$("input[type='text']").blur(function(){
			var price=0;
			var sumprice=0;
			var myTableTr=document.getElementById("mytabletr").getElementsByTagName("tr"); alert("aaa");
			for(var i=0;i<myTableTr.length;i++){

			price=myTableTr[i].getElementsByTagName("td")[0].childNodes[0].value;
			sumprice+=parseInt(price);
			}
			$("#sum").html("￥"+sumprice);
			alert("aaa");
		});
})
</script>
  </head>
  
  <body>
  <table id="mytabletr">
  	<tr><td><input type="text" /></td></tr>
  </table>
  <label id="sum"></label>
   					 <%
                    	Calendar c=Calendar.getInstance();
                    	Date date=new Date();
                    	c.setTime(date);
                    	pageContext.setAttribute("nowDate",c.getTime());
                     %>
                    填报时间：<s:date name="#attr.nowDate" format="yyyy年MM月dd日 hh:mm:ss" />
                    <div id="voteoptions">
    	<input  type="file" name="upload" />
    	</div>
    	<a href="javascript:;" onclick="AddOption()">增加选项</a>
    	<input type="submit" value="提交" />
                    
  </body>
</html>
